import React, {Component} from 'react'
import { Button, Modal } from 'antd'
import './navs.scss'
export default class Layout extends Component {
    state = {
        isModalVisible: false
    }
    onChange = () => {
        console.log('xxxxxxxxxx')
    }
    showModal = () => {
        this.setState({
            isModalVisible: true
        })
    }
    handleOk = () => {
        this.setState({
            isModalVisible: false
        })
    }
    handleCancel = () => {
        this.setState({
            isModalVisible: false
        })
    }
    render() {
        const { isModalVisible } = this.state
        return (
            <div className={'navs tag-container'}>
                <Button onClick={ this.showModal }>首页</Button >
                <Button onClick={ this.onChange }>公司简介</Button >
                <Button onClick={ this.onChange }>产品中心</Button >
                <Button onClick={ this.onChange }>新闻资讯</Button >
                <Button onClick={ this.onChange }>联系我们</Button >
                <Modal title="Basic Modal" open={ isModalVisible } onOk={ this.handleOk } onCancel={ this.handleCancel }>
                    <p>Some contents...</p>
                    <p>Some contents...</p>
                    <p>Some contents...</p>
                </Modal>
            </div>
        )
    }
}
